﻿using ManagementApi.Models.Person;

namespace ManagementApi.Models
{
    public class ReadCardReport : CardInfo
    {
        /// <summary>
        /// 设备ID
        /// </summary>
        public string SamId { get; set; }

        /// <summary>
        /// 签名
        /// </summary>
        public string Token { get; set; }

        /// <summary>
        /// 设备信息
        /// </summary>
        public string DeviceInfo { get; set; }

        /// <summary>
        /// 描述信息
        /// </summary>
        public string Description { get; set; }
    }

    public static partial class ReadCardReportExceptions
    {
        public static PersonCreateForm AsPersonCreateForm(this ReadCardReport readCardReport)
        {
            PersonCreateForm personInfo = new()
            {
                token = readCardReport.Token
            };
            return personInfo;
        }
    }
}